import request from '@/utils/request'

// 查询海报模板地址列表
export function listPoster(query) {
  return request({
    url: '/allocation/poster/list',
    method: 'get',
    params: query
  })
}

// 查询海报模板地址详细
export function getPoster(id) {
  return request({
    url: '/allocation/poster/' + id,
    method: 'get'
  })
}

// 新增海报模板地址
export function addPoster(data) {
  return request({
    url: '/allocation/poster',
    method: 'post',
    data: data
  })
}

// 修改海报模板地址
export function updatePoster(data) {
  return request({
    url: '/allocation/poster',
    method: 'put',
    data: data
  })
}

// 删除海报模板地址
export function delPoster(id) {
  return request({
    url: '/allocation/poster/' + id,
    method: 'delete'
  })
}

// 消息状态修改
export function changeNoticeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/allocation/poster/changeStatus',
    method: 'put',
    data: data
  })
}
